package org.springblade.system.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springblade.system.entity.Dept;
import org.springblade.system.service.IDeptService;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.entity.UserDept;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ZH
 */
@RestController
@RequestMapping("synchronizedData")
@AllArgsConstructor
@Slf4j
public class SynchronizedDataController {
	private IDeptService deptService;

	/**
	 * 查询所有部门
	 */
	@ApiOperationSupport(order = 1)
	@ApiOperation(value = "查询所有部门", notes = "")
	@GetMapping("/getAllDeptList")
	public R<List<Dept>> getAllDeptList() {
		return R.data(deptService.list());
	}
}
